chore: bump Kysely to 0.29#2626
Conversation
…-auth/core instances pnpm creates two instances of @better-auth/core due to different peer dependency contexts (@better-auth/cli pulls in @better-auth/telemetry which creates a separate resolution). Importing BetterAuthOptions and Where directly from @better-auth/core resolved to the wrong instance, making those types incompatible with the ones used internally by better-auth/adapters. Fix by importing BetterAuthOptions and Where from better-auth instead, which resolves to the same instance that createAdapterFactory uses. Also pin @better-auth/core via pnpm override to prevent further drift. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughPin ChangesDependency overrides
Workspace manifest
Auth adapter
ORM Kysely utils
Bun E2E tests
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @ymc9's task —— View job PR Review: Better Auth Type Compatibility FixCode Review AnalysisThis PR addresses a legitimate dependency resolution issue with Better Auth that causes type incompatibilities. Here's my comprehensive review: ✅ Code Quality & Best PracticesExcellent Solution: The fix correctly addresses the root cause by importing types from the unified Clean Changes:
✅ Dependency ManagementSmart Prevention: The pnpm override in Consistent Versioning: The override aligns with the devDependency versions already specified in the Better Auth package. ✅ Bug Fix AssessmentRoot Cause Correctly Identified: The issue stems from Appropriate Solution: Using the unified ✅ Security ConsiderationsNo Security Issues: The changes only modify import sources and don't introduce any security vulnerabilities. The pnpm override actually improves security by ensuring consistent dependency versions.
|
|
Claude finished @ymc9's task —— View job PR Review: Better Auth Type Compatibility FixTodo List
Code Review AnalysisThis PR addresses a legitimate dependency resolution issue with Better Auth that causes type incompatibilities. Here's my comprehensive review: ✅ Code Quality & Best PracticesExcellent Solution: The fix correctly addresses the root cause by importing types from the unified Clean Changes:
✅ Dependency ManagementSmart Prevention: The pnpm override in Consistent Versioning: The override aligns with the devDependency versions already specified in the Better Auth package. ✅ Bug Fix AssessmentRoot Cause Correctly Identified: The issue stems from Appropriate Solution: Using the unified ✅ Security ConsiderationsNo Security Issues: The changes only modify import sources and don't introduce any security vulnerabilities. The pnpm override actually improves security by ensuring consistent dependency versions.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
package.json (1)
17-17:⚠️ Potential issue | 🟡 MinorPin
packageManagerto the repo-required pnpm version.Line 17 uses
pnpm@10.33.0, but this repo policy requirespnpm@10.12.1.As per coding guidelines "Use pnpm for package management with version pinned to
pnpm@10.12.1."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` at line 17, The packageManager field is pinned to pnpm@10.33.0 but repo policy requires pnpm@10.12.1; update the packageManager value (the "packageManager" JSON key in package.json) to "pnpm@10.12.1" so the repository uses the required pinned pnpm version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@package.json`:
- Line 17: The packageManager field is pinned to pnpm@10.33.0 but repo policy
requires pnpm@10.12.1; update the packageManager value (the "packageManager"
JSON key in package.json) to "pnpm@10.12.1" so the repository uses the required
pinned pnpm version.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 69d5e636-ec09-45fa-b68f-9f8bb1a8b7a1
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
package.jsonpackages/auth-adapters/better-auth/src/adapter.ts
|
Claude finished @ymc9's task —— View job PR Review: Better Auth Type Compatibility FixTodo List
Code Review AnalysisThis PR addresses a legitimate dependency resolution issue with Better Auth that causes type incompatibilities. Here's my comprehensive review: ✅ Code Quality & Best PracticesExcellent Solution: The fix correctly addresses the root cause by importing types from the unified Clean Changes:
✅ Dependency ManagementSmart Prevention: The pnpm override in Consistent Versioning: The override aligns with the devDependency versions already specified in the Better Auth package. Kysely Upgrade: Updated workspace dependency to ✅ Bug Fix AssessmentRoot Cause Correctly Identified: The issue stems from Appropriate Solution: Using the unified ✅ Security ConsiderationsNo Security Issues: The changes only modify import sources and don't introduce any security vulnerabilities. The pnpm override actually improves security by ensuring consistent dependency versions.
|
|
Claude finished @ymc9's task —— View job PR Review: Better Auth Type Compatibility FixTodo List
Code Review AnalysisThis PR addresses a legitimate dependency resolution issue with Better Auth that causes type incompatibilities. Here's my comprehensive review: ✅ Code Quality & Best PracticesExcellent Solution: The fix correctly addresses the root cause by importing types from the unified Clean Changes:
✅ Dependency ManagementSmart Prevention: The pnpm override in Consistent Versioning: The override aligns with the devDependency versions already specified in the Better Auth package. Kysely Upgrade: Updated workspace dependency to ✅ Bug Fix AssessmentRoot Cause Correctly Identified: The issue stems from Appropriate Solution: Using the unified ✅ Security ConsiderationsNo Security Issues: The changes only modify import sources and don't introduce any security vulnerabilities. The pnpm override actually improves security by ensuring consistent dependency versions.
|
|
Claude finished @ymc9's task —— View job PR Review: Better Auth Type Compatibility FixTodo List
Code Review AnalysisThis PR addresses a legitimate dependency resolution issue with Better Auth that causes type incompatibilities. Here's my comprehensive review: ✅ Code Quality & Best PracticesExcellent Solution: The fix correctly addresses the root cause by importing types from the unified Clean Changes:
✅ Dependency ManagementSmart Prevention: The pnpm override in Consistent Versioning: The override aligns with the devDependency versions already specified in the Better Auth package. Kysely Upgrade: Updated workspace dependency to ✅ Bug Fix AssessmentRoot Cause Correctly Identified: The issue stems from Appropriate Solution: Using the unified ✅ Security ConsiderationsNo Security Issues: The changes only modify import sources and don't introduce any security vulnerabilities. The pnpm override actually improves security by ensuring consistent dependency versions.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/runtimes/bun/bun-e2e.test.ts`:
- Line 15: The test silently maps TEST_DB_PROVIDER='mysql' into the PostgreSQL
configuration because the provider variable (const provider = ...) falls through
to the else branch that configures PostgreSQL; update the conditional logic
where the DB is configured (the branch that currently builds the PostgreSQL
dialect/schema path in the else block) to explicitly handle provider === 'mysql'
and set the MySQL-specific dialect, connection string/schema path, and any
migration fixtures accordingly instead of defaulting to PostgreSQL, keeping the
existing sqlite and postgresql branches unchanged and ensuring the mysql case
uses the correct MySQL config symbols used elsewhere in the test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4e762cb1-86f1-4cad-93a6-dfce9ff7736b
📒 Files selected for processing (1)
tests/runtimes/bun/bun-e2e.test.ts
|
Claude finished @ymc9's task —— View job PR Review: Better Auth Type Compatibility FixTodo List
Code Review AnalysisThis PR addresses a legitimate dependency resolution issue with Better Auth that causes type incompatibilities. Here's my comprehensive review: ✅ Code Quality & Best PracticesExcellent Solution: The fix correctly addresses the root cause by importing types from the unified Clean Changes:
✅ Dependency ManagementSmart Prevention: The pnpm override in Consistent Versioning: The override aligns with the devDependency versions already specified in the Better Auth package. Kysely Upgrade: Updated workspace dependency to ✅ Bug Fix AssessmentRoot Cause Correctly Identified: The issue stems from Appropriate Solution: Using the unified ✅ Security ConsiderationsNo Security Issues: The changes only modify import sources and don't introduce any security vulnerabilities. The pnpm override actually improves security by ensuring consistent dependency versions.
|
Summary
@better-auth/coregets two separate pnpm store instances because@better-auth/clipulls in@better-auth/telemetry, which creates a different peer dependency resolution contextBetterAuthOptionsandWheredirectly from@better-auth/coreinadapter.tsresolved to the wrong instance — incompatible with the types used internally bybetter-auth/adapters'screateAdapterFactorybetter-authinstead, which uses the same@better-auth/coreinstance ascreateAdapterFactory@better-auth/coreto1.4.19to prevent future driftTest plan
pnpm --filter @zenstackhq/better-auth buildcompletes without TypeScript errors@zenstackhq/better-authtests:pnpm --filter @zenstackhq/better-auth test🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Refactor
Bug Fixes
Tests